<!DOCTYPE html>
<html>
<body>
<input type="text" id="input" placeholder="输入内容" oninput="reverseText()">
<input type="text" id="output" readonly>

<script>
function reverseText() {
  const input = document.getElementById('input').value;
  document.getElementById('output').value = 
    input.split('').reverse().join('');
}
</script>
</body>
</html>